package com.dd.cloud.user.req.pres;

import com.dd.cloud.common.annotate.validation.Desc;
import com.dd.cloud.common.annotate.validation.FixedValue;
import com.dd.cloud.common.annotate.validation.Name;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 中药仓库表
 * </p>
 *
 * @author czg
 * @since 2022-05-09
 */
@Data
public class DrugsModelAddReq implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 药材编码
     */
    @Name(begin = "药材编码", required = false)
    private String drugnum;

    /**
     * 药材名称
     */
    @NotBlank(message = "请填写必填项药品名称内容")
    @Name(begin = "药品名称")
    private String herbName;

    /**
     * 用法及注意事项
     */
    @Name(begin = "用法及注意事项", required = false)
    private String precautions;

    /**
     * 规格
     */
    @NotBlank(message = "请填写必填项规格内容")
    @Name(begin = "规格")
    private String specification;

    /**
     * 药材单位
     */
    @NotBlank(message = "请填写必填项药品单位内容")
    @FixedValue(strValues = {"g","条","具","枚","片", "个","对","毫升","只","粒"})
    private String useUnit;

    /**
     * 药材类型 1药材原料 2中成药
     */
    private Integer type;

    /**
     * 备注
     */
    @Desc(begin = "备注", required = false)
    private String remarks;

    /**
     * 产地
     */
    @Name(begin = "药品产地", required = false)
    private String origin;

    /**
     * 药材单价/售价
     */
    @NotNull(message = "请填写必填项药材售价内容")
    //@Fee(begin = "药材售价")
    private BigDecimal price;

    /**
     * 药材原价/成本价
     */
    //@Fee(begin = "药材原价", required = false)
    private BigDecimal originalPrice;

}
